package com.webbei.Backstage.action;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.webbei.Backstage.service.BackstateSer;
import com.webbei.pojo.BgPic;

public class getPartPicByLabelIdAction {
	private BackstateSer bao;
	private int labelId;
	private List<BgPic> partPic;
	public String execute(){
		System.out.println("labelId:"+labelId);
		int prolabId=bao.getProLabIdByLabelId(labelId);
		System.out.println("prolabId:"+prolabId);
		partPic=bao.getBgPicByProLabId(prolabId);
		
		
		HttpServletResponse response=ServletActionContext.getResponse();
		response.setHeader("Pragma","No-cache");
		response.setHeader("Cache-Control","no-cache"); 
		response.setDateHeader("Expires", 0);
		return "success";
	}
	public int getLabelId() {
		return labelId;
	}
	public void setLabelId(int labelId) {
		this.labelId = labelId;
	}
	public void setBao(BackstateSer bao) {
		this.bao = bao;
	}
	public List<BgPic> getPartPic() {
		return partPic;
	}
	public void setPartPic(List<BgPic> partPic) {
		this.partPic = partPic;
	}
	
}
